package com.markchu.modules.system.repository;


import com.markchu.modules.system.domain.ActivityUserPic;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Map;

/**
 * @author mark_chu
 * @date 2023/11/23
 */
public interface ActivityUserPicRepository extends BaseRepository<ActivityUserPic, Long> {
    @Query(value = "select waju.user_id as userId,waju.ac_id as acId,waju.id as ajuId,waup.id as aupId,sf.id as fileId,sf.`path`,waju.clicks from " +
            "web_activity_join_user waju left join web_activity_user_pic waup on waup.aju_id = waju.id left join sys_file sf " +
            "on waup.file_id = sf.id where waju.ac_id = ?1",nativeQuery = true)
    List<Map<String,Object>> findAllByacId(Long ajuIds);
}